package com.example.java8demo.supplierDemo;

import com.example.java8demo.functionDemo.FuncDemo;

import java.util.function.Function;
import java.util.function.Supplier;

/**
 * 没有参数，有返回结果
 *
 * @author tianzhuang
 * @version 1.0
 * @date 2022/1/18 12:01
 */
public class SupDemo {
    public static Integer test1(Integer val) {
        return val * 10;
    }
    public static Integer test() {
        Supplier<Integer> supplier = () -> test1(10);
        return supplier.get();
    }
    public static void main(String[] args) {
        System.err.println(SupDemo.test());
    }
}
